home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 19.zip / BS1 part 19 / Lattice C disk 4.adf / Compiler_Headers / graphics / text.h < prev    next >
C/C++ Source or Header  |  1988-10-25  |  3KB  |  80 lines

  1. #ifndef GRAPHICS_TEXT_H
  2. #define GRAPHICS_TEXT_H
  3. /*
  4. **    $Filename: graphics/text.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef        EXEC_PORTS_H
  14. #include "exec/ports.h"
  15. #endif
  16.  
  17. /*------ Font Styles ------------------------------------------------*/
  18. #define FS_NORMAL    0          /* normal text (no style bits set) */
  19. #define FSB_EXTENDED 3          /* extended face (wider than normal) */
  20. #define FSF_EXTENDED (1<<3)
  21. #define FSB_ITALIC   2          /* italic (slanted 1:2 right) */
  22. #define FSF_ITALIC   (1<<2)
  23. #define FSB_BOLD     1          /* bold face text (ORed w/ shifted) */
  24. #define FSF_BOLD     (1<<1)
  25. #define FSB_UNDERLINED    0     /* underlined (under baseline) */
  26. #define FSF_UNDERLINED    (1<<0)
  27.  
  28. /*------ Font Flags -------------------------------------------------*/
  29. #define FPB_ROMFONT  0          /* font is in rom */
  30. #define FPF_ROMFONT  (1<<0)
  31. #define FPB_DISKFONT 1          /* font is from diskfont.library */
  32. #define FPF_DISKFONT (1<<1)
  33. #define FPB_REVPATH  2          /* designed path is reversed (e.g. left) */
  34. #define FPF_REVPATH  (1<<2)
  35. #define     FPB_TALLDOT 3          /* designed for hires non-interlaced */
  36. #define     FPF_TALLDOT (1<<3)
  37. #define     FPB_WIDEDOT 4          /* designed for lores interlaced */
  38. #define     FPF_WIDEDOT (1<<4)
  39. #define FPB_PROPORTIONAL   5  /* character sizes can vary from nominal */
  40. #define FPF_PROPORTIONAL   (1<<5)
  41. #define FPB_DESIGNED 6          /* size is "designed", not constructed */
  42. #define FPF_DESIGNED (1<<6)
  43. #define FPB_REMOVED  7          /* the font has been removed */
  44. #define FPF_REMOVED  (1<<7)
  45.  
  46. /****** TextAttr node, matches text attributes in RastPort **********/
  47. struct TextAttr {
  48.    STRPTR   ta_Name;          /* name of the font */
  49.    UWORD    ta_YSize;          /* height of the font */
  50.    UBYTE    ta_Style;          /* intrinsic font style */
  51.    UBYTE    ta_Flags;          /* font preferences and flags */
  52. };
  53.  
  54.  
  55. /****** TextFonts node **********************************************/
  56. struct TextFont {
  57.    struct Message tf_Message;        /* reply message for font removal */
  58.                   /* font name in LN    \    used in this */
  59.    UWORD    tf_YSize;          /* font height        |    order to best */
  60.    UBYTE    tf_Style;          /* font style        |    match a font */
  61.    UBYTE    tf_Flags;          /* preferences and flags    /    request. */
  62.    UWORD    tf_XSize;          /* nominal font width */
  63.    UWORD    tf_Baseline;      /* distance from the top of char to baseline */
  64.    UWORD    tf_BoldSmear;     /* smear to affect a bold enhancement */
  65.  
  66.    UWORD    tf_Accessors;     /* access count */
  67.  
  68.    UBYTE    tf_LoChar;          /* the first character described here */
  69.    UBYTE    tf_HiChar;          /* the last character described here */
  70.    APTR        tf_CharData;      /* the bit character data */
  71.  
  72.    UWORD    tf_Modulo;          /* the row modulo for the strike font data */
  73.    APTR        tf_CharLoc;          /* ptr to location data for the strike font */
  74.          /*       2 words: bit offset then size */
  75.    APTR        tf_CharSpace;     /* ptr to words of proportional spacing data */
  76.    APTR        tf_CharKern;      /* ptr to words of kerning data */
  77. };
  78.  
  79. #endif    /* GRAPHICS_TEXT_H */
  80.